class VideoListModel {
  late int total;
  late List<VideoModel> videoList;

  VideoListModel({this.total = 0, required this.videoList});

  VideoListModel.fromJson(Map<String, dynamic> json) {
    total = json['total'];
    if (json['videoList'] != null) {
      // videoList = new List<VideoModel>();
      videoList = [];
      json['videoList'].forEach((v) {
        videoList.add(new VideoModel.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['total'] = total;
    if (videoList != null) {
      data['videoList'] = videoList.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class VideoModel {
  late String videoId;
  late String uuid;
  late String title;
  late String tags;
  late String status;
  late int size;
  late double duration;
  late String description;
  late String createTime;
  late String modifyTime;
  late String modificationTime;
  late String creationTime;
  late String coverUrl;
  late int cateId;
  late String cateName;
  late String storageLocation;
  late String fileUrl;

  VideoModel(
      {this.videoId = "",
      this.uuid = "",
      this.title = "",
      this.tags = "",
      this.status = "",
      this.size = 0,
      this.duration = 0,
      this.description = "",
      this.createTime = "",
      this.modifyTime = "",
      this.modificationTime = "",
      this.creationTime = "",
      this.coverUrl = "",
      this.cateId = 0,
      this.cateName = "",
      this.storageLocation = "",
      this.fileUrl = ""});

  VideoModel.fromJson(Map<String, dynamic> json) {
    videoId = json['videoId'];
    uuid = json['uuid'];
    title = json['title'];
    tags = json['tags'];
    status = json['status'];
    size = json['size'];
    duration = json['duration'];
    description = json['description'];
    createTime = json['createTime'];
    modifyTime = json['modifyTime'];
    modificationTime = json['modificationTime'];
    creationTime = json['creationTime'];
    coverUrl = json['coverUrl'];
    cateId = json['cateId'];
    cateName = json['cateName'];
    storageLocation = json['storageLocation'];
    fileUrl = json['fileUrl'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['videoId'] = videoId;
    data['uuid'] = uuid;
    data['title'] = title;
    data['tags'] = tags;
    data['status'] = status;
    data['size'] = size;
    data['duration'] = duration;
    data['description'] = description;
    data['createTime'] = createTime;
    data['modifyTime'] = modifyTime;
    data['modificationTime'] = modificationTime;
    data['creationTime'] = creationTime;
    data['coverUrl'] = coverUrl;
    data['cateId'] = cateId;
    data['cateName'] = cateName;
    data['storageLocation'] = storageLocation;
    data['fileUrl'] = fileUrl;
    return data;
  }
}
